'use strict';
const path = require('path')
const loadingSpinner = require('loading-spinner')


function isObject(o) {
    return Object.prototype.toString.call(o) === '[object Object]';
}

function pathFormate(p) {
    if(path.sep !== '/' && typeof p === 'string'){
        return p.replace(/\\/g,'/');
    }
    return p;
}

function loadingSpinners(){
  // Customize the spinner sequence
  loadingSpinner.setSequence(
    ['|','/','-','\\'], // Sequence of spinner elements
  );
  return loadingSpinner;
}

module.exports = {
    isObject,
    pathFormate,
    loadingSpinners
}
